Kanzi 4.0.0-beta2
kanzi::CubeMapRenderPass Class Reference

Use the Cubemap Render Pass to create a cubemap texture that represents the scene from some location. More...

#include <kanzi/core.ui/graphics3d/cubemap_render_pass.hpp>

Inheritance diagram for kanzi::CubeMapRenderPass:
[legend]

Public Types

using ConceptClass
 Mipmap Generation Concept class used to implement this class.
 
- Public Types inherited from kanzi::RenderPass
enum  AttachmentState { Detached , Detaching , Attaching , Attached }
 Attachment state for keeping track current status. More...
 
typedef BindingRuntimeContainer::const_iterator BindingRuntimeConstIterator
 Const iterator type for binding runtime container.
 
typedef vector< AbstractBindingRuntimeSharedPtrBindingRuntimeContainer
 Container type for binding runtimes.
 
typedef BindingRuntimeContainer::iterator BindingRuntimeIterator
 Iterator type for binding runtime container.
 
using CameraSettingsPtr
 Camera settings unique pointer type.
 
typedef ChildContainer::const_iterator ChildConstIterator
 Child container iterator type.
 
typedef vector< RenderPassSharedPtrChildContainer
 Container type for children.
 
- Public Types inherited from kanzi::GPUResource
enum  MemoryType { GpuOnly , GpuAndRam , RamOnly }
 Memory upload and RAM preservation strategy for GPU resources. More...
 
- Public Types inherited from kanzi::PropertyObject
using PropertyStorageConstIterator
 
using PropertyStorageContainer
 
using PropertyStorageIterator
 
using PropertyStoragePtr
 
using PropertyStorageReverseIterator
 
- Public Types inherited from kanzi::BindingHostConcept
using BindingHostConceptSharedPtr
 Binding host concept shared pointer type.
 
using BindingRuntimeConstIterator
 Const iterator for binding runtimes.
 
using BindingRuntimeContainer
 Container for binding runtimes.
 
using BindingRuntimeIterator
 Iterator for binding runtimes.
 

Public Member Functions

FramebuffergetFramebuffer (size_t index) const
 Gets the used framebuffer by index.
 
 KZ_METACLASS_END ()
 
- Public Member Functions inherited from kanzi::MipmapGenerationConceptImpl< RenderPass, CubeMapRenderPass, 6u >
MaterialSharedPtr getColorMipmapMaterial0 () const
 Gets the value of the ColorMipmapMaterial0Property property.
 
MaterialSharedPtr getColorMipmapMaterial1 () const
 Gets the value of the ColorMipmapMaterial1Property property.
 
MaterialSharedPtr getColorMipmapMaterial2 () const
 Gets the value of the ColorMipmapMaterial2Property property.
 
MaterialSharedPtr getColorMipmapMaterial3 () const
 Gets the value of the ColorMipmapMaterial3Property property.
 
MaterialSharedPtr getCubemapMipmapMaterial () const
 Gets the value of the CubemapMipmapMaterialProperty property.
 
float getCurrentMipmapLevel () const
 Gets the value of the CurrentMipmapLevelProperty property.
 
MaterialSharedPtr getDepthMipmapMaterial () const
 Gets the value of the DepthMipmapMaterialProperty property.
 
TextureSharedPtr getMipmapSourceTexture () const
 Gets the value of the MipmapSourceTextureProperty property.
 
void setColorMipmapMaterial0 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial0Property property.
 
void setColorMipmapMaterial1 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial1Property property.
 
void setColorMipmapMaterial2 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial2Property property.
 
void setColorMipmapMaterial3 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial3Property property.
 
void setCubemapMipmapMaterial (MaterialSharedPtr value)
 Sets the value of the CubemapMipmapMaterialProperty property.
 
void setCurrentMipmapLevel (float value)
 Sets the value of the CurrentMipmapLevelProperty property.
 
void setDepthMipmapMaterial (MaterialSharedPtr value)
 Sets the value of the DepthMipmapMaterialProperty property.
 
void setMipmapSourceTexture (TextureSharedPtr value)
 Sets the value of the MipmapSourceTextureProperty property.
 
- Public Member Functions inherited from kanzi::RenderPass
void addChild (RenderPassSharedPtr childRenderPass)
 Adds a render pass as the last child of the render pass you set.
 
void attach ()
 Attaches the render pass.
 
void attachRecursive (Node &node)
 Recursively attaches a render pass tree.
 
ChildConstIterator beginChildren () const
 Returns an iterator to the beginning of the container of child render passes.
 
BindingLookupContextPtr createLookupContext (RenderPassSharedPtr templateRoot)
 Creates a lookup context for a given render pass.
 
void detach ()
 Detaches the render pass.
 
void detachRecursive ()
 Recursively detaches a render pass tree.
 
ChildConstIterator endChildren () const
 Returns an iterator to the end of the container of child render passes.
 
string getCamera () const
 Gets the value of the CameraProperty.
 
RenderPassSharedPtr getChild (size_t index)
 Gets a child render pass at the given index.
 
size_t getChildCount () const
 Returns the number of child render passes.
 
size_t getChildIndex (RenderPass &childRenderPass) const
 Gets the index of a child in this render pass.
 
virtual CompositionRequirements getCompositionRequirements ()
 Queries if a render pass requires a depth buffer.
 
NodegetHostNode () const
 Gets the host node of a render pass.
 
Vector4 getInputViewport () const
 Gets the value of InputViewportAreaProperty.
 
RenderPassgetParent () const
 Gets the parent of a render pass.
 
ScenegetSceneForRenderPass () const
 Gets the scene being rendered by the render pass.
 
RenderPassSharedPtr getTemplateRoot () const
 Gets the template root of this render pass.
 
int getUpdateOffset () const
 Gets the update offset of the Render Pass.
 
int getUpdateRate () const
 Gets the value of UpdateRateProperty.
 
Viewport2DgetViewportForRenderPass () const
 Gets a viewport parent for a render pass.
 
void insertChild (size_t index, RenderPassSharedPtr childRenderPass)
 Adds a render pass as a child render pass at given index of the render pass you set.
 
bool isAttached () const
 Tells if a render pass is attached.
 
bool isAttaching () const
 Tells if a render pass is attaching.
 
bool isDetached () const
 Tells if a render pass is detached.
 
bool isDetaching () const
 Tells if render pass is detaching.
 
bool isEnabled () const
 Gets the value of the EnabledProperty property.
 
ObjectSharedPtr lookupObject (string_view relativePath)
 Lookup for an object from a node.
 
template<typename T >
shared_ptr< TlookupObject (string_view relativePath)
 Lookup a relative object of specific type.
 
void reloadOverride () override
 Resource::reloadOverride() implementation.
 
void removeAllChildren ()
 Removes all child render passes from a render pass.
 
void removeChild (RenderPass &childRenderPass)
 Removes a child render pass.
 
void removeChild (size_t index)
 Removes a child render pass.
 
void render (Renderer &renderer, const CameraSettings *cameraSettings)
 Recursively render RenderPass and all of its child render passes.
 
void restoreResourcesRecursive ()
 Recursively calls restoreResources for a RenderPass and all its children.
 
void setCamera (string_view value)
 Sets the value of the CameraProperty.
 
void setEnabled (bool value)
 Sets the value of the EnabledProperty.
 
void setHostNode (Node *hostNode)
 Sets the host node of a render pass.
 
void setParent (RenderPass *parent)
 Sets the parent of a render pass.
 
void setTemplateRoot (RenderPassSharedPtr templateRoot)
 Sets the template root for this render pass.
 
void setUpdateRate (int updateRate)
 Sets the value of UpdateRateProperty.
 
void setUpdateRateOffset (int updateOffset)
 Sets the value of UpdateOffsetProperty.
 
 ~RenderPass () override
 Destructor.
 
- Public Member Functions inherited from kanzi::GPUResource
void destroy ()
 Destroys a GPU resource.
 
size_t getGPUMemoryUsage () const
 Gets the amount of GPU memory used by the resource.
 
RenderergetRenderer () const
 
void invalidate ()
 Notify resource that graphics context was lost and all GPU resources are invalid.
 
bool isDeployed () const
 
 ~GPUResource () override
 
- Public Member Functions inherited from kanzi::Resource
size_t getCPUMemoryUsage () const
 Gets the amount of CPU memory used by the resource.
 
const string & getName () const
 Gets the resource name.
 
const string & getUrl () const
 Gets the resource URL.
 
bool isKeepAlive () const
 Tells if the resource has keep alive flag set.
 
void reload ()
 
void reloadFromFile (string_view filePath)
 
void reloadFromKzb (KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 
void setKeepAlive (bool keepAlive)
 Sets the keep alive flag.
 
void setUrl (string_view url)
 Sets the resource URL.
 
 ~Resource () override
 Destructor.
 
- Public Member Functions inherited from kanzi::Object
AppliedStyleEntrySharedPtr applyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object.
 
void applyObjectStyles ()
 Apply all styles for an object node.
 
DomaingetDomain () const
 Returns the domain the object belongs to.
 
const MetaclassgetDynamicMetaclass () const override
 Returns the metaclass of the dynamic type of the object.
 
MainLoopSchedulergetMainLoopScheduler () const
 Returns the MainLoopScheduler instance of the associated Domain.
 
detail::MessageDispatcher * getMessageDispatcher () const
 Returns the message dispatcher of the object.
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object.
 
ScriptingContextSharedPtr getScriptingContext () const
 Gets the scripting context of the object.
 
 Object (Domain *domain)
 
void setScriptingContext (ScriptingContextSharedPtr context)
 Sets the scripting context of the object.
 
void unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles.
 
 ~Object () override
 
- Public Member Functions inherited from kanzi::MetaObject
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it.
 
virtual ~MetaObject ()
 
- Public Member Functions inherited from kanzi::PropertyObject
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier.
 
template<typename DataType >
void addPropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Adds a property modifier without notifying handlers.
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 Returns the begin iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator beginPropertyStorage () const
 Returns the begin iterator to the internal property storage container.
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object.
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object.
 
PropertyStorageContainer::iterator endPropertyStorage ()
 Returns the end iterator to the internal property storage container.
 
PropertyStorageContainer::const_iterator endPropertyStorage () const
 Returns the end iterator to the internal property storage container.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property type.
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers.
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType) const
 Gets number of current notification handlers for given property type.
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers.
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property.
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property.
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value.
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
 PropertyObject ()
 
void removeKzbProperties ()
 Remove all KZB properties.
 
void removeKzbProperties (flat_set< AbstractPropertyType > *keepProperties)
 Remove all KZB properties that are not included in a given set.
 
template<typename DataType >
void removeLocalPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property.
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Removes a property modifier.
 
template<typename DataType >
void removePropertyModifierWithoutNotifyingHandlers (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 Removes a property modifier without notifying handlers.
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *ownerPointer)
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property type.
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
void validatePropertyModifiersAndNotifyHandlers (AbstractPropertyType propertyType)
 Validates property modifiers and notifies handlers.
 
virtual ~PropertyObject ()
 
- Public Member Functions inherited from kanzi::BindingHostConceptImpl< RenderPass >
void addBindingRuntime (AbstractBindingRuntimeSharedPtr entry, shared_ptr< void > owner)
 Adds an already-created binding runtime to this binding host.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< RenderPass > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< RenderPass > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Sets a binding to a certain property.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< RenderPass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding.
 
- Public Member Functions inherited from kanzi::BindingHostConcept
BindingRuntimeConstIterator beginBindingRuntimes () const
 Returns an iterator to the beginning of binding runtimes.
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Returns an iterator to the end of binding runtimes.
 
AbstractBindingRuntimeSharedPtr getBindingRuntime (size_t idx)
 Gets binding by index.
 
size_t getBindingRuntimeCount () const
 Gets the number of binding runtimes added to this node.
 
void removeAllBindings ()
 Removes all binding runtimes.
 
void removeBinding (BindingRuntimeHandle &bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner.
 

Static Public Member Functions

static CubeMapRenderPassSharedPtr create (Domain *domain, string_view name)
 Create function.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::MipmapGenerationConceptImpl< RenderPass, CubeMapRenderPass, 6u >
static string faceIndexToString (size_t faceIndex)
 Converts face index to string.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static string makeMipmapFramebufferLabel (string_view name, size_t faceIndex, size_t mipmapLevel)
 Creates a mipmap level name.
 
- Static Public Member Functions inherited from kanzi::RenderPass
static RenderPassSharedPtr create (Domain *domain, string_view name)
 Create a render pass.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info.
 
- Static Public Member Functions inherited from kanzi::MipmapGenerationConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

void clearResourcesInternal ()
 Clear internal resources that Kanzi created when executing this render pass.
 
 CubeMapRenderPass (Domain *domain, string_view name)
 Constructor.
 
void destroyOverride () override
 GPUResource::destroyOverride() implementation.
 
size_t getGPUMemoryUsageOverride () const override
 GpuResource::getGPUMemoryUsageOverride() implementation.
 
void invalidateOverride () override
 GPUResource::invalidateOverride() implementation.
 
bool isDeployedOverride () const override
 GPUResource::isDeployedOverride() implementation.
 
void onDetached () override
 RenderPass::onDetached() implementation.
 
void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Object::onPropertyChanged() implementation.
 
void renderMipmaps (Renderer &renderer, MipmapAttachment &attachmentPoint, const TextureSharedPtr &texture, uint32_t firstFace)
 Renders mipmap levels with a material.
 
void renderOverride (Renderer &renderer, const CameraSettings *cameraSettings) override
 RenderPass::renderOverride() implementation.
 
void restoreResources () override
 RenderPass::restoreResources() implementation.
 
void updateResultTexture (Renderer &renderer)
 Updates the Result Texture to reflect the properties of the node.
 
- Protected Member Functions inherited from kanzi::MipmapGenerationConceptImpl< RenderPass, CubeMapRenderPass, 6u >
MipmapRenderData & ensureMipmapData ()
 Allocates the mipmap render data if it's not allocated yet.
 
void eraseMipmapAttachmentData (size_t attachmentIndex)
 Erases a mipmap attachment.
 
CubeMapRenderPassgetThisObject ()
 Gets the pointer to this object (CRTP).
 
const CubeMapRenderPassgetThisObject () const
 Gets the pointer to this object (CRTP) (const version).
 
 MipmapGenerationConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Object::onPropertyChanged() implementation.
 
- Protected Member Functions inherited from kanzi::RenderPass
CameraacquireCamera (string_view relativePath) const
 Acquires a Camera node based on the value of the Camera property.
 
LightacquireLight (string_view relativePath) const
 
CompositionRequirements combineChildCompositionRequirements (CompositionRequirements requirements)
 Iterates the children for composition requirements.
 
CompositionRequirements getChildCompositionRequirements ()
 Iterates the children for composition requirements.
 
virtual void onAttached ()
 Called when a render pass becomes attached.
 
void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Object::onPropertyChanged() implementation.
 
void renderChildren (Renderer &renderer, const CameraSettings *cameraSettings)
 Render all child render passes of a render pass.
 
virtual void renderChildrenOverride (Renderer &renderer, const CameraSettings *cameraSettings)
 Implementation-dependent rendering of all child render passes of a render pass.
 
 RenderPass (Domain *domain, string_view name)
 Constructor.
 
template<typename T >
void updatePropertyValueSourceAndNotify (AbstractPropertyType propertyType, typename PropertyType< T >::Descriptor::TypedValueSource &valueSource, const T &value)
 Updates the local value of a property in a Draw Objects Render Pass.
 
- Protected Member Functions inherited from kanzi::GPUResource
 GPUResource (Domain *domain, string_view name="")
 Constructor.
 
- Protected Member Functions inherited from kanzi::Resource
virtual size_t getCPUMemoryUsageOverride () const
 Implementation for getting the amount of CPU memory used by the resource.
 
virtual void reloadFromFileOverride (string_view filePath)
 
virtual void reloadFromKzbOverride (KzbFile &kzbFile, ReadOnlyMemoryFile &file, KzbMemoryParser &parser)
 
 Resource (Domain *domain, string_view name)
 Constructor.
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
void initialize ()
 
 MetaObject ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 Acquires a local value source entry that is free for the assignment of a value.
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 Acquires a property storage.
 
template<typename DataType >
void addPropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Adds a property modifier entry to the property modifier stack and validates the modifiers.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, AbstractPropertyTypeDescriptor::ValueSourceOwner *owner)
 Internally adds a property value source.
 
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *ownerPointer)
 Internally adds a property value source.
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 Constructs a new local value source entry.
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &otherPropertyStorage)
 Copy local value from property storage.
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the property storage for given property type descriptor.
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer which you can use to hold a reference until the end of the operation.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByNameAndDataType (string_view name, PropertyDataType dataType) const
 Finds a property type descriptor by name and data type.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByQualifiedNameAndDataType (string_view qualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with qualified names.
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType) const
 Like findPropertyTypeDescriptorByNameAndDataType, but only searches by matching with unqualified names.
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 Gets the top-level value source for a given property descriptor.
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason)
 Notifies all property handlers on a property storage.
 
void onCopy (const PropertyObject &other)
 
void removeLocalValue (AbstractPropertyTypeDescriptor &descriptor, PropertyStoragePtr &propertyStorage)
 Removes a local value from the given property storage.
 
template<typename DataType >
void removePropertyModifierBase (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner, bool notify)
 Removes a property modifier entry from the property modifier stack and validates the remaining modifiers.
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 Removes a property value source.
 
void validatePropertyModifiers (AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 Validates property modifiers without notifying handlers.
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 Validates property modifiers and notifies handlers.
 
- Protected Member Functions inherited from kanzi::BindingHostConceptImpl< RenderPass >
RenderPassgetThisObject ()
 Internal accessor for the Curiously Recurring Template Pattern.
 
const RenderPassgetThisObject () const
 Internal accessor for the Curiously Recurring Template Pattern.
 
- Protected Member Functions inherited from kanzi::BindingHostConcept
void attachBindings ()
 Attach all bindings stored in this object.
 
void detachBindings ()
 Detach bindings.
 

Protected Attributes

TextureSharedPtr m_automaticColorTarget
 The composition target created automatically.
 
TextureSharedPtr m_automaticDepthTarget
 The depth target created automatically.
 
optional< GraphicsFormatm_cachedColorFormat
 Cached color format.
 
optional< GraphicsCompareFunctionm_cachedDepthCompareFunction
 Cached depth compare function.
 
optional< GraphicsFormatm_cachedDepthFormat
 Cached depth format.
 
optional< GraphicsFormatm_cachedDepthRenderbufferFormat
 Cached depth renderbuffer format.
 
optional< Sampler::Filterm_cachedFilterMode
 Cached filter mode.
 
optional< Sampler::MipmapModem_cachedMipmapMode
 Cached mipmap mode.
 
optional< intm_cachedResolution
 Cached resolution.
 
bool m_cachedResolveImmediately
 Cached resolve immediately.
 
TextureSharedPtr m_colorTarget
 Color target set from outside.
 
RenderbufferSharedPtr m_depthStencilRenderbuffer
 Renderbuffer to use with the framebuffers pointing at the texture.
 
TextureSharedPtr m_depthTarget
 Depth target set from outside.
 
uint32_t m_faceIndex
 Next cubemap face to be updated.
 
array< FramebufferPtr, 6um_framebuffers
 Pointers to framebuffers for rendering into distinct cube map sides.
 
bool m_updateRequired
 Flag set to true when update is required due to property changes.
 
- Protected Attributes inherited from kanzi::MipmapGenerationConceptImpl< RenderPass, CubeMapRenderPass, 6u >
unique_ptr< MipmapRenderData > m_mipmapRenderData
 Mipmap generation data.
 
- Protected Attributes inherited from kanzi::RenderPass
AttachmentState m_attachmentState
 Render pass attachment state.
 
ChildContainer m_children
 Child render passes.
 
bool m_enabled
 Render pass enabled state.
 
uint64_t m_frameNumber
 Current frame number used for update rate control.
 
Nodem_hostNode
 Pointer to host node this render pass is attached under.
 
PropertyType< Vector4 >::Descriptor::TypedValueSource m_inputViewportAreaValueSource
 Value source for the input viewport area property.
 
RenderPassm_parent
 Pointer to parent render pass.
 
weak_ptr< RenderPassm_templateRoot
 Weak pointer to template root object of this render pass.
 
uint64_t m_updateOffset
 Current update rate offset property value cached.
 
uint64_t m_updateRate
 Current update rate property value cached.
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object.
 
- Protected Attributes inherited from kanzi::BindingHostConcept
BindingRuntimeContainer m_bindingRuntimes
 Bindings in this object.
 

Properties

static PropertyType< ResourceSharedPtrCompositionTargetProperty
 Use the Composition Target property to set the target to which you want to render the result of this render pass.
 
static PropertyType< ResourceSharedPtrDepthTargetProperty
 Use the Depth Target property to set the target for the depth texture that you want to use for rendering.
 
static PropertyType< ResourceSharedPtrResultTextureProperty
 Use the Result Texture property to fetch the texture to which this CubeMapRenderPass is rendered.
 
static PropertyType< ResourceSharedPtrResultDepthTextureProperty
 Use the Result Depth Texture property to fetch the depth texture to which this CubeMapRenderPass is rendered.
 
static PropertyType< intResolutionProperty
 Use the Resolution property to set the dimensions of the automatically created composition cubemap target textures.
 
static PropertyType< GraphicsFormatPixelFormatProperty
 Use the Pixel Format property to set on the GPU the target pixel format of the automatically created composition target textures.
 
static PropertyType< GraphicsFormatDepthFormatProperty
 Use the Depth Format property to define the format of the depth texture.
 
static PropertyType< GraphicsFormatDepthRenderbufferFormatProperty
 Use the DepthRenderBufferFormat the graphics format of the depth renderbuffer.
 
static PropertyType< GraphicsCompareFunctionDepthCompareFunctionProperty
 Use the Depth Compare Function property to set the function that you want to use when comparing depth values with comparison samplers.
 
static PropertyType< Sampler::FilterFilterModeProperty
 Use the Filter Mode property to set how texels are sampled when using the composition target as a texture:
 
static PropertyType< Sampler::MipmapModeMipmapModeProperty
 Use the MipmapMode property to set how mipmaps are generated for the composition target.
 
static PropertyType< boolResolveImmediatelyProperty
 Sets whether the Cubemap Render Pass generates mipmaps immediately after rendering.
 
static PropertyType< string > OverrideCameraProperty
 Use the Override Camera property to set a camera to use for rendering. This camera overrides the default camera.
 
static PropertyType< intFaceUpdateRateProperty
 Use the FaceUpdateRate property to set how many faces of the cubemap are rendered each frame.
 
TextureSharedPtr getCompositionTarget () const
 Gets the value of the CompositionTargetProperty property.
 
void setCompositionTarget (TextureSharedPtr value)
 Sets the value of the CompositionTargetProperty property.
 
TextureSharedPtr getDepthTarget () const
 Gets the value of the DepthTargetProperty property.
 
void setDepthTarget (TextureSharedPtr value)
 Sets the value of the DepthTargetProperty property.
 
TextureSharedPtr getResultTexture () const
 Gets the value of the ResultTextureProperty property.
 
void setResultTexture (TextureSharedPtr value)
 Sets the value of the ResultTextureProperty property.
 
TextureSharedPtr getResultDepthTexture () const
 Gets the value of the ResultDepthTextureProperty property.
 
void setResultDepthTexture (TextureSharedPtr value)
 Sets the value of the ResultDepthTextureProperty property.
 
void setResolution (int value)
 Sets the value of the ResolutionProperty property.
 
int getResolution () const
 Gets the value of the ResolutionProperty property.
 
GraphicsFormat getPixelFormat () const
 Gets the value of the PixelFormatProperty property.
 
void setPixelFormat (GraphicsFormat value)
 Sets the value of the PixelFormatProperty property.
 
GraphicsFormat getDepthTextureFormat () const
 Gets the value of the DepthFormatProperty.
 
void setDepthTextureFormat (GraphicsFormat value)
 Sets the value of the DepthFormatProperty.
 
GraphicsCompareFunction getDepthCompareFunction () const
 Gets the value of the DepthCompareFunctionProperty.
 
void setDepthCompareFunction (GraphicsCompareFunction value)
 Sets the value of the DepthCompareFunctionProperty.
 
Sampler::Filter getFilterMode () const
 Gets the value of the FilterModeProperty.
 
void setFilterMode (Sampler::Filter value)
 Sets the value of the FilterModeProperty.
 
Sampler::MipmapMode getMipmapMode () const
 Gets the value of the MipmapModeProperty.
 
void setMipmapMode (Sampler::MipmapMode value)
 Sets the value of the MipmapModeProperty.
 
bool isResolveImmediately () const
 Returns the value of the ResolveImmediatelyProperty.
 
void setResolveImmediately (bool value)
 Sets the value of the ResolveImmediatelyProperty.
 
string getOverrideCamera () const
 Gets the value of the OverrideCameraProperty property.
 
void setOverrideCamera (string_view value)
 Sets the value of the OverrideCameraProperty property.
 
void setFaceUpdateRate (int value)
 Sets the value of the FaceUpdateRateProperty property.
 
int getFaceUpdateRate () const
 Gets the value of the FaceUpdateRateProperty property.
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::RenderPass
static PropertyType< string > CameraProperty
 Sets the Camera node that you want this render pass to use to render content.
 
static PropertyType< boolEnabledProperty
 Use the Enabled property to turn render passes and render pass trees on or off.
 
static PropertyType< Vector4InputViewportAreaProperty
 Reports the size of the Viewport 2D that uses this render pass.
 
static PropertyType< intUpdateOffsetProperty
 Sets the offset to add to the frame count when calculating the update rate of the Render Pass.
 
static PropertyType< intUpdateRateProperty
 Sets the rate at which to render the Render Pass.
 
- Static Public Attributes inherited from kanzi::MipmapGenerationConcept
static PropertyType< ResourceSharedPtrColorMipmapMaterial0Property
 Sets the material to use to generate the mipmaps for the first color result texture (Result Texture 0) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial1Property
 Sets the material to use to generate the mipmaps for the second color result texture (Result Texture 1) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial2Property
 Sets the material to use to generate the mipmaps for the third color result texture (Result Texture 2) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial3Property
 Sets the material to use to generate the mipmaps for the fourth color result texture (Result Texture 3) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrCubemapMipmapMaterialProperty
 Sets the material to use to generate the mipmaps for the Result Texture of a CubeMapRenderPass.
 
static PropertyType< floatCurrentMipmapLevelProperty
 Reports the mipmap level that Kanzi is generating.
 
static PropertyType< ResourceSharedPtrDepthMipmapMaterialProperty
 Sets the material to use to generate the mipmaps for the Result Depth Texture of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrMipmapSourceTextureProperty
 Reports the texture that contains the render target texture for which Kanzi creates mipmaps.
 
- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container.
 

Detailed Description

Use the Cubemap Render Pass to create a cubemap texture that represents the scene from some location.

You can use the result of the Cubemap Render Pass as a cubemap texture. For example, use the Cubemap Render Pass to create dynamic reflections of the environment on the surface of 3D nodes.

The Cubemap Render Pass is similar to the CompositionTargetRenderPass, except that the Cubemap Render Pass sets each face of a cubemap as the composition target before rendering the descendant render passes.

Configuring the cubemap composition target

By default, the Cubemap Render Pass creates a cubemap composition target automatically. The attributes of the generated cubemap are derived from these properties of the Cubemap Render Pass:

Configuring the Cubemap Render Pass for depth rendering

By default, Cubemap Render Pass only creates a color texture that you can access through the ResultTextureProperty. To create a depth texture, set the DepthFormatProperty.

Kanzi creates color and depth textures as follows:

If you need depth for correct rendering, but do not set the depth format, to save memory and improve performance, Cubemap Render Pass creates a depth renderbuffer that Kanzi reuses for each face.

Setting the cubemap texture manually

By manually setting a cubemap texture you override all other settings related to the automatic creation of cubemap textures.

To set the cubemap composition target manually:

  • Set the CompositionTargetProperty to the Cubemap Render Target Texture that you want to use as the composition target.
  • Set the DepthTargetProperty to the Cubemap Render Target Texture that you want to use as the depth target.

To create a Cubemap Render Target Texture, use Texture::CreateInfoCubemapRenderTarget.

Accessing the composition result

When you set a Cubemap Render Target Texture as the composition target of a Cubemap Render Pass, you can use that texture as the cubemap texture in materials.

To use the result textures of a Cubemap Render Pass in another render pass, create bindings to these properties:

You can use these properties to access the result textures of both the composition targets that you set explicitly and the composition targets that the Cubemap Render Pass creates automatically.

Examples

To create and use a Cubemap Render Pass:

// Create a Cubemap Render Pass.
// Create a template for blit render pass to run once per each face of the cubemap.
// Add blit as child of cubemap render pass.
cubemapTemplate->addChild(blit);
// Create a prefab from the templates.
CameraSharedPtr camera = Camera::create(domain, "camera");
scene->addChild(camera);
scene->setCamera(camera);
viewport->setOpacity(0.9f);
// Set render pass prefab for viewport.
viewport->setRenderPassPrefab(renderPassPrefab);
Since
Kanzi 3.8.0

Member Typedef Documentation

◆ ConceptClass

Mipmap Generation Concept class used to implement this class.

Constructor & Destructor Documentation

◆ CubeMapRenderPass()

kanzi::CubeMapRenderPass::CubeMapRenderPass ( Domain * domain,
string_view name )
explicitprotected

Constructor.

Parameters
domainThe domain to use.
nameThe name of the Composition Target Render Pass.

Member Function Documentation

◆ getCompositionTarget()

TextureSharedPtr kanzi::CubeMapRenderPass::getCompositionTarget ( ) const
inline

Gets the value of the CompositionTargetProperty property.

Returns
The value of the Composition Target property.
See also
setCompositionTarget()

◆ setCompositionTarget()

void kanzi::CubeMapRenderPass::setCompositionTarget ( TextureSharedPtr value)
inline

Sets the value of the CompositionTargetProperty property.

Parameters
valueThe new value of the Composition Target property.
See also
getCompositionTarget()

◆ getDepthTarget()

TextureSharedPtr kanzi::CubeMapRenderPass::getDepthTarget ( ) const
inline

Gets the value of the DepthTargetProperty property.

Returns
The value of Depth Target property.
See also
setDepthTarget().
Since
Kanzi 3.9.8

◆ setDepthTarget()

void kanzi::CubeMapRenderPass::setDepthTarget ( TextureSharedPtr value)
inline

Sets the value of the DepthTargetProperty property.

Parameters
valueThe new value of the Depth Target property.
See also
getDepthTarget().
Since
Kanzi 3.9.8

◆ getResultTexture()

TextureSharedPtr kanzi::CubeMapRenderPass::getResultTexture ( ) const
inline

Gets the value of the ResultTextureProperty property.

Returns
The value of the Result Texture property.
See also
setResultTexture()

◆ setResultTexture()

void kanzi::CubeMapRenderPass::setResultTexture ( TextureSharedPtr value)
inline

Sets the value of the ResultTextureProperty property.

Parameters
valueThe new value of the Result Texture property.
See also
getResultTexture()

◆ getResultDepthTexture()

TextureSharedPtr kanzi::CubeMapRenderPass::getResultDepthTexture ( ) const
inline

Gets the value of the ResultDepthTextureProperty property.

Returns
The value of the Result Depth Texture property.
See also
setResultDepthTexture()
Since
Kanzi 3.9.8

◆ setResultDepthTexture()

void kanzi::CubeMapRenderPass::setResultDepthTexture ( TextureSharedPtr value)
inline

Sets the value of the ResultDepthTextureProperty property.

Parameters
valueThe new value of the Result Depth Texture property.
See also
getResultDepthTexture()
Since
Kanzi 3.9.8

◆ setResolution()

void kanzi::CubeMapRenderPass::setResolution ( int value)
inline

Sets the value of the ResolutionProperty property.

Parameters
valueThe new value of the Resolution property.
See also
getResolution()

◆ getResolution()

int kanzi::CubeMapRenderPass::getResolution ( ) const
inline

Gets the value of the ResolutionProperty property.

Returns
The value of the Resolution property.
See also
setResolution()

◆ getPixelFormat()

GraphicsFormat kanzi::CubeMapRenderPass::getPixelFormat ( ) const
inline

Gets the value of the PixelFormatProperty property.

Returns
The value of the Pixel Format property.
See also
setPixelFormat()

◆ setPixelFormat()

void kanzi::CubeMapRenderPass::setPixelFormat ( GraphicsFormat value)
inline

Sets the value of the PixelFormatProperty property.

Parameters
valueThe new value of the Pixel Format property.
See also
getPixelFormat()

◆ getDepthTextureFormat()

GraphicsFormat kanzi::CubeMapRenderPass::getDepthTextureFormat ( ) const
inline

Gets the value of the DepthFormatProperty.

Returns
The value of the Depth Format property.

◆ setDepthTextureFormat()

void kanzi::CubeMapRenderPass::setDepthTextureFormat ( GraphicsFormat value)
inline

Sets the value of the DepthFormatProperty.

Parameters
valueThe new value of the Depth Format property.

◆ getDepthCompareFunction()

GraphicsCompareFunction kanzi::CubeMapRenderPass::getDepthCompareFunction ( ) const
inline

Gets the value of the DepthCompareFunctionProperty.

Returns
The value of the Depth Compare Function property.

◆ setDepthCompareFunction()

void kanzi::CubeMapRenderPass::setDepthCompareFunction ( GraphicsCompareFunction value)
inline

Sets the value of the DepthCompareFunctionProperty.

Parameters
valueThe value of the Depth Compare Function property.

◆ getFilterMode()

Sampler::Filter kanzi::CubeMapRenderPass::getFilterMode ( ) const
inline

Gets the value of the FilterModeProperty.

Returns
The value of the Filter Mode property.

◆ setFilterMode()

void kanzi::CubeMapRenderPass::setFilterMode ( Sampler::Filter value)
inline

Sets the value of the FilterModeProperty.

Parameters
valueThe new value of the Filter Mode property.

◆ getMipmapMode()

Sampler::MipmapMode kanzi::CubeMapRenderPass::getMipmapMode ( ) const
inline

Gets the value of the MipmapModeProperty.

Returns
The value of the Mipmap Mode property.

◆ setMipmapMode()

void kanzi::CubeMapRenderPass::setMipmapMode ( Sampler::MipmapMode value)
inline

Sets the value of the MipmapModeProperty.

Parameters
valueThe new value of the Mipmap Mode property.

◆ isResolveImmediately()

bool kanzi::CubeMapRenderPass::isResolveImmediately ( ) const
inline

Returns the value of the ResolveImmediatelyProperty.

Returns
The value of the ResolveImmediatelyProperty.
Since
Kanzi 3.9.0

◆ setResolveImmediately()

void kanzi::CubeMapRenderPass::setResolveImmediately ( bool value)
inline

Sets the value of the ResolveImmediatelyProperty.

Parameters
valueThe value of the ResolveImmediatelyProperty to set.
Since
Kanzi 3.9.0

◆ getOverrideCamera()

string kanzi::CubeMapRenderPass::getOverrideCamera ( ) const
inline

Gets the value of the OverrideCameraProperty property.

See also
setOverrideCamera()

◆ setOverrideCamera()

void kanzi::CubeMapRenderPass::setOverrideCamera ( string_view value)
inline

Sets the value of the OverrideCameraProperty property.

See also
getOverrideCamera()

◆ setFaceUpdateRate()

void kanzi::CubeMapRenderPass::setFaceUpdateRate ( int value)
inline

Sets the value of the FaceUpdateRateProperty property.

Parameters
valueThe new value of the FaceUpdateRate property.
See also
getFaceUpdateRate()
Since
Kanzi 3.9.8

◆ getFaceUpdateRate()

int kanzi::CubeMapRenderPass::getFaceUpdateRate ( ) const
inline

Gets the value of the FaceUpdateRateProperty property.

Returns
The value of the FaceUpdateRate property.
See also
setFaceUpdateRate()
Since
Kanzi 3.9.8

◆ KZ_METACLASS_END()

kanzi::CubeMapRenderPass::KZ_METACLASS_END ( )

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::CubeMapRenderPass::makeEditorInfo ( )
static

◆ create()

static CubeMapRenderPassSharedPtr kanzi::CubeMapRenderPass::create ( Domain * domain,
string_view name )
static

Create function.

◆ getFramebuffer()

Framebuffer * kanzi::CubeMapRenderPass::getFramebuffer ( size_t index) const
inline

Gets the used framebuffer by index.

This function is intended for tests. The user should have no need to call this function.

Parameters
indexIndex of the framebuffer to access.
Returns
Framebuffer at index.

◆ updateResultTexture()

void kanzi::CubeMapRenderPass::updateResultTexture ( Renderer & renderer)
protected

Updates the Result Texture to reflect the properties of the node.

This function first attempts to use the Composition Target. If that fails, it uses the ResolutionProperty, PixelFormatProperty, FilterModeProperty, and MipmapModeProperty properties to generate a new texture.

Parameters
rendererRenderer used for validating cube map settings.
Since
Kanzi 4.0.0 changed the type of the renderer parameter to Renderer&.

◆ clearResourcesInternal()

void kanzi::CubeMapRenderPass::clearResourcesInternal ( )
protected

Clear internal resources that Kanzi created when executing this render pass.

Also clears result properties. Kanzi calls this function when CompositionTargetRenderPass is detached.

◆ renderMipmaps()

void kanzi::CubeMapRenderPass::renderMipmaps ( Renderer & renderer,
MipmapAttachment & attachmentPoint,
const TextureSharedPtr & texture,
uint32_t firstFace )
protected

Renders mipmap levels with a material.

Parameters
rendererRenderer to use.
attachmentPointMipmap attachment point.
textureThe cubemap texture to which to render the mipmaps. Must not be null.
firstFaceThe index of the first cubemap face to update.
Since
Kanzi 4.0.0

◆ onDetached()

void kanzi::CubeMapRenderPass::onDetached ( )
overrideprotectedvirtual

RenderPass::onDetached() implementation.

Reimplemented from kanzi::RenderPass.

◆ renderOverride()

void kanzi::CubeMapRenderPass::renderOverride ( Renderer & renderer,
const CameraSettings * cameraSettings )
overrideprotectedvirtual

RenderPass::renderOverride() implementation.

Reimplemented from kanzi::RenderPass.

◆ restoreResources()

void kanzi::CubeMapRenderPass::restoreResources ( )
overrideprotectedvirtual

RenderPass::restoreResources() implementation.

Reimplemented from kanzi::RenderPass.

◆ destroyOverride()

void kanzi::CubeMapRenderPass::destroyOverride ( )
overrideprotectedvirtual

GPUResource::destroyOverride() implementation.

Reimplemented from kanzi::GPUResource.

◆ getGPUMemoryUsageOverride()

size_t kanzi::CubeMapRenderPass::getGPUMemoryUsageOverride ( ) const
overrideprotectedvirtual

GpuResource::getGPUMemoryUsageOverride() implementation.

Reimplemented from kanzi::GPUResource.

◆ isDeployedOverride()

bool kanzi::CubeMapRenderPass::isDeployedOverride ( ) const
overrideprotectedvirtual

GPUResource::isDeployedOverride() implementation.

Reimplemented from kanzi::RenderPass.

◆ invalidateOverride()

void kanzi::CubeMapRenderPass::invalidateOverride ( )
overrideprotectedvirtual

GPUResource::invalidateOverride() implementation.

Reimplemented from kanzi::GPUResource.

◆ onPropertyChanged()

void kanzi::CubeMapRenderPass::onPropertyChanged ( AbstractPropertyType propertyType,
PropertyNotificationReason reason )
overrideprotectedvirtual

Object::onPropertyChanged() implementation.

Reimplemented from kanzi::PropertyObject.

Member Data Documentation

◆ CompositionTargetProperty

PropertyType<ResourceSharedPtr> kanzi::CubeMapRenderPass::CompositionTargetProperty
static

Use the Composition Target property to set the target to which you want to render the result of this render pass.

The default value is ResourceSharedPtr().

See also
setCompositionTarget(), getCompositionTarget()

◆ DepthTargetProperty

PropertyType<ResourceSharedPtr> kanzi::CubeMapRenderPass::DepthTargetProperty
static

Use the Depth Target property to set the target for the depth texture that you want to use for rendering.

The default value is ResourceSharedPtr().

See also
setDepthTarget(), getDepthTarget()
Since
Kanzi 3.9.8

◆ ResultTextureProperty

PropertyType<ResourceSharedPtr> kanzi::CubeMapRenderPass::ResultTextureProperty
static

Use the Result Texture property to fetch the texture to which this CubeMapRenderPass is rendered.

The default value is ResourceSharedPtr().

See also
setResultTexture(), getResultTexture()

◆ ResultDepthTextureProperty

PropertyType<ResourceSharedPtr> kanzi::CubeMapRenderPass::ResultDepthTextureProperty
static

Use the Result Depth Texture property to fetch the depth texture to which this CubeMapRenderPass is rendered.

The default value is ResourceSharedPtr().

See also
getResultDepthTexture(), setResultDepthTexture()
Since
Kanzi 3.9.8

◆ ResolutionProperty

PropertyType<int> kanzi::CubeMapRenderPass::ResolutionProperty
static

Use the Resolution property to set the dimensions of the automatically created composition cubemap target textures.

The default value is 64.

See also
setResolution(), getResolution()

◆ PixelFormatProperty

PropertyType<GraphicsFormat> kanzi::CubeMapRenderPass::PixelFormatProperty
static

Use the Pixel Format property to set on the GPU the target pixel format of the automatically created composition target textures.

The default value is RGBA.

See also
getPixelFormat(), setPixelFormat()

◆ DepthFormatProperty

PropertyType<GraphicsFormat> kanzi::CubeMapRenderPass::DepthFormatProperty
static

Use the Depth Format property to define the format of the depth texture.

If the Depth Format property is not set, depth texture is not used and, if necessary, depth renderbuffer is used.

◆ DepthRenderbufferFormatProperty

PropertyType<GraphicsFormat> kanzi::CubeMapRenderPass::DepthRenderbufferFormatProperty
static

Use the DepthRenderBufferFormat the graphics format of the depth renderbuffer.

The available formats are:

The depth renderbuffer format only has effect if DepthFormatProperty is not set, and depth is required.

◆ DepthCompareFunctionProperty

PropertyType<GraphicsCompareFunction> kanzi::CubeMapRenderPass::DepthCompareFunctionProperty
static

Use the Depth Compare Function property to set the function that you want to use when comparing depth values with comparison samplers.

The default value is kanzi::GraphicsCompareFunctionDisabled.

◆ FilterModeProperty

PropertyType<Sampler::Filter> kanzi::CubeMapRenderPass::FilterModeProperty
static

Use the Filter Mode property to set how texels are sampled when using the composition target as a texture:

◆ MipmapModeProperty

PropertyType<Sampler::MipmapMode> kanzi::CubeMapRenderPass::MipmapModeProperty
static

Use the MipmapMode property to set how mipmaps are generated for the composition target.

◆ ResolveImmediatelyProperty

PropertyType<bool> kanzi::CubeMapRenderPass::ResolveImmediatelyProperty
static

Sets whether the Cubemap Render Pass generates mipmaps immediately after rendering.

To generate the mipmaps later in another Cubemap Render Pass, set this property to false. The default value is true.

Since
Kanzi 3.9.0

◆ OverrideCameraProperty

PropertyType<string> kanzi::CubeMapRenderPass::OverrideCameraProperty
static

Use the Override Camera property to set a camera to use for rendering. This camera overrides the default camera.

◆ FaceUpdateRateProperty

PropertyType<int> kanzi::CubeMapRenderPass::FaceUpdateRateProperty
static

Use the FaceUpdateRate property to set how many faces of the cubemap are rendered each frame.

The default value is 6.

See also
setFaceUpdateRate(), getFaceUpdateRate()
Since
Kanzi 3.9.8

◆ m_colorTarget

TextureSharedPtr kanzi::CubeMapRenderPass::m_colorTarget
protected

Color target set from outside.

◆ m_depthTarget

TextureSharedPtr kanzi::CubeMapRenderPass::m_depthTarget
protected

Depth target set from outside.

◆ m_automaticColorTarget

TextureSharedPtr kanzi::CubeMapRenderPass::m_automaticColorTarget
protected

The composition target created automatically.

◆ m_automaticDepthTarget

TextureSharedPtr kanzi::CubeMapRenderPass::m_automaticDepthTarget
protected

The depth target created automatically.

◆ m_depthStencilRenderbuffer

RenderbufferSharedPtr kanzi::CubeMapRenderPass::m_depthStencilRenderbuffer
protected

Renderbuffer to use with the framebuffers pointing at the texture.

◆ m_faceIndex

uint32_t kanzi::CubeMapRenderPass::m_faceIndex
protected

Next cubemap face to be updated.

◆ m_framebuffers

array<FramebufferPtr, 6u> kanzi::CubeMapRenderPass::m_framebuffers
protected

Pointers to framebuffers for rendering into distinct cube map sides.

Since
Kanzi 4.0.0

◆ m_cachedResolution

optional<int> kanzi::CubeMapRenderPass::m_cachedResolution
protected

Cached resolution.

Since
Kanzi 4.0.0

◆ m_cachedColorFormat

optional<GraphicsFormat> kanzi::CubeMapRenderPass::m_cachedColorFormat
protected

Cached color format.

Since
Kanzi 4.0.0

◆ m_cachedDepthFormat

optional<GraphicsFormat> kanzi::CubeMapRenderPass::m_cachedDepthFormat
protected

Cached depth format.

Since
Kanzi 4.0.0

◆ m_cachedDepthRenderbufferFormat

optional<GraphicsFormat> kanzi::CubeMapRenderPass::m_cachedDepthRenderbufferFormat
protected

Cached depth renderbuffer format.

Since
Kanzi 4.0.0

◆ m_cachedDepthCompareFunction

optional<GraphicsCompareFunction> kanzi::CubeMapRenderPass::m_cachedDepthCompareFunction
protected

Cached depth compare function.

Since
Kanzi 4.0.0

◆ m_cachedFilterMode

optional<Sampler::Filter> kanzi::CubeMapRenderPass::m_cachedFilterMode
protected

Cached filter mode.

Since
Kanzi 4.0.0

◆ m_cachedMipmapMode

optional<Sampler::MipmapMode> kanzi::CubeMapRenderPass::m_cachedMipmapMode
protected

Cached mipmap mode.

Since
Kanzi 4.0.0

◆ m_cachedResolveImmediately

bool kanzi::CubeMapRenderPass::m_cachedResolveImmediately
protected

Cached resolve immediately.

Since
Kanzi 4.0.0

◆ m_updateRequired

bool kanzi::CubeMapRenderPass::m_updateRequired
protected

Flag set to true when update is required due to property changes.

Since
Kanzi 4.0.0

The documentation for this class was generated from the following file: